CC ?= gcc

CFLAGS	?= -std=c11 -Wall -Wextra -Wpedantic -Werror -g
LDFLAGS =  -T new_symbol.ld

SRCS		= main.c
OBJS		= $(SRCS:.c=.o)
TARGET		= $(OUTPUT_DIR)/exercise-13

OUTPUT_DIR ?= .
all:$(TARGET)

$(TARGET): $(OBJS) new_symbol.ld
	$(CC) $(LDFLAGS) -nostartfiles -o $@ $(OBJS)

%.o: %.c
	$(CC) $(CFLAGS) -c -o $@ $<

clean:
	rm -f $(TARGET) $(OBJS)
